<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "httdiv://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="httdiv://www.w3.org/1999/xhtml">
<head>
<meta httdiv-equiv="X-UA-Comdivatible" content="IE=EmulateIE7" />

<title> 急租</title>



<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head>
<body>
<div id="modalWindow">
   
     
      
      
      </p>
	  <form  name="dataForm" method="post" action="renthot.php?action=save" onsubmit="return check();">
	<input type="hidden"  name="itemid" value="{$itemid}">
	<input type="hidden" name="buy_price" value="{$MOD['credit_hot']}" size="10" id="price" onkeyup="CA();"/>
    <table cellspacing="1" cellpadding="6" class="tb">
	<tr>
<td class="tl">每天急租的价格：</td>
<td class="tr f_red f_b"> {$MOD['credit_hot']}{$AJ[credit_name]}</td>
</tr>
	<tr>
<td class="tl">购买时长：</td>
<td class="tr">
       
       <select name="buy_day" id="day" onchange="CA();">
{php for($i=1;$i<=31;$i++){}
<option value="{$i}">{$i}</option>
{php }}
</select> 天
</td>
</tr>
<tr>
<td class="tl">应付总价：</td>
<td class="tr f_red f_b" id="payment">{$price}{$MOD['credit_hot']}</td>
</tr>
{if $currency == 'money'}
<tr>
<td class="tl">{$AJ[money_name]}余额：</td>
<td class="tr"><span class="f_blue f_b">{$_money}{$unit}</span>&nbsp;&nbsp;<a href="charge.php?action=pay" target="_blank" class="t">[充值]</a></td>
</tr>
<tr>
<td class="tl">支付密码：</td>
<td class="tr">{template 'password', 'chip'}</td>
</tr>
{else}
<tr>
<td class="tl">{$AJ[credit_name]}余额：</td>
<td class="tr"><span class="f_blue f_b">{$_credit}{$unit}</span>&nbsp;&nbsp;<a href="credit.php?action=buy" target="_blank" class="t">[购买]</a></td>
</tr>
{/if}
<tr>
<td class="tl"> </td>
<td class="tr"><input type="submit" name="submit" value="确定购买" class="sBtn"/>&nbsp;

</td>
</tr>
</table>
    </form>
</div>
<script type="text/javascript">
function CA() {
	
		Dd('payment').innerHTML = Dd('price').value*Dd('day').value;
	

}
function check() {
	var p = Dd('price').value;
	
	{if $currency == 'money'}
	if(p*Dd('day').value > {$_money}) {
		alert('帐户余额不足，请先充值');
		return false;
	}
	{else}
	if(p*Dd('day').value > {$_credit}) {
		alert('您的{$AJ[credit_name]}不足，请先购买');
		return false;
	}
	{/if}
	
	{if $currency == 'money'}
	if(Dd('password').value.length < 6) {
		alert('请填写支付密码');
		Dd('password').focus();
		return false;
	}
	{/if}
}
</script>